StupidBeauty
Read times:257Posted at:Mon May 2 22:20:50 2011
- no title specified

Wt3.1.9文档翻译:WLabel类参考,WLabel Class Reference

针对一个表单域而使用的文字标签。

一个文字标签可以包含一个图片和/或一段文字。它充当一个代理的角色 ,为一个 WFormWidget 提供焦点 。如果同时指定咯图片和文字的话 ,那么图片会被放置在文字的左边。

使用示例

Wt::WContainerWidget *w = new Wt::WContainerWidget();

Wt::WLabel *label = new Wt::WLabel("Favourite Actress: ", w);

Wt::WLineEdit *edit = new Wt::WLineEdit("Renee Zellweger", w);

 label->setBuddy(edit);

这个部件与HTML <label>标记对应。如果没有设置伙伴的话,那么它会被渲染成一个HTML <span> 或者 <div> ,以避免在微软的Internet Explorer 上的鼠标单击事件处理的毛病

WLabel是一个内联部件。

CSS

这个部件不提供样式设置功能,但是可以使用内联或者外部的CSS 来进行样式处理。一个文字标签的文字可以通过一个嵌套的 <span> 元素来设置样式,而它的图片可以通过一个嵌套的 <img> 元素来设置样式。

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4